From 6dcbbc6e0d5662450ccbdbcb00ba2e3a2c794bf9 Mon Sep 17 00:00:00 2001 From: Debian LibreOffice Maintainers Date: Wed, 1 Aug 2012 08:41:17 +0000 Subject: [PATCH] mention-java-common-package =================================================================== Gbp-Pq: Name mention-java-common-package.diff --- jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 3 +++ svtools/source/java/javainteractionhandler.cxx | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 0432c11db48..85beac4425e 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -170,6 +170,9 @@ static bool findAndSelect(JavaInfo ** ppInfo) if (errcode == JFW_E_NO_JAVA_FOUND) { fprintf(stderr,"javaldx: Could not find a Java Runtime Environment! \n"); + fprintf(stderr,"Please ensure that a JVM and the package libreoffice-java-common\n"); + fprintf(stderr,"is installed.\n"); + fprintf(stderr,"If it is already installed then try removing ~/.libreoffice/3/user/config/javasettings_Linux_*.xml\n"); return false; } else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE) diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 61192de7568..713dae2dd07 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -50,9 +50,10 @@ #include #include +#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) + using namespace com::sun::star::uno; using namespace com::sun::star::task; - namespace svt { @@ -154,6 +155,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_INVALIDJAVASETTINGS ) ); String aTitle( SvtResId(STR_WARNING_INVALIDJAVASETTINGS)); aWarningBox.SetText( aTitle ); + String aText = String(aWarningBox.GetMessText()); + aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality.")); + aWarningBox.SetMessText( aText ); nResult = aWarningBox.Execute(); } else @@ -171,6 +175,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque QueryBox aQueryBox( NULL, SvtResId( QBX_JAVADISABLED ) ); String aTitle( SvtResId( STR_QUESTION_JAVADISABLED ) ); aQueryBox.SetText( aTitle ); + String aText = String(aQueryBox.GetMessText()); + aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality.")); + aQueryBox.SetMessText( aText ); nResult = aQueryBox.Execute(); if ( nResult == RET_YES ) { @@ -213,6 +220,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque ErrorBox aErrorBox(NULL, SvtResId( ERRORBOX_RESTARTREQUIRED ) ); String aTitle( SvtResId( STR_ERROR_RESTARTREQUIRED ) ); aErrorBox.SetText( aTitle ); + String aText = String(aErrorBox.GetMessText()); + aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality.")); + aErrorBox.SetMessText( aText ); nResult = aErrorBox.Execute(); } else -- 2.30.2